PCI: fold pci_get_pdev{,_by_domain}()
authorJan Beulich <jbeulich@suse.com>
Fri, 12 Aug 2022 06:37:09 +0000 (08:37 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 12 Aug 2022 06:37:09 +0000 (08:37 +0200)
commita37f9ea7a651fd798397a3db6dbf7939feeb43a8
tree9688a0b24a3532b3b0f347c333162e4a039f2810
parent8cf6e0738906fc269af40135ed82a07815dd3b9c
PCI: fold pci_get_pdev{,_by_domain}()

Rename the latter, subsuming the functionality of the former when passed
NULL as first argument.

Since this requires touching all call sites anyway, take the opportunity
and fold the remaining three parameters into a single pci_sbdf_t one.

No functional change intended. In particular the locking related
assertion needs to continue to be kept silent when a non-NULL domain
pointer is passed - both vpci_read() and vpci_write() call the function
without holding the lock (adding respective locking to vPCI [or finding
an alternative to doing so] is the topic of a separate series).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Rahul Singh <rahul.singh@arm.com>
Tested-by: Rahul Singh <rahul.singh@arm.com>
12 files changed:
xen/arch/x86/irq.c
xen/arch/x86/msi.c
xen/arch/x86/pci.c
xen/arch/x86/physdev.c
xen/common/sysctl.c
xen/drivers/passthrough/amd/iommu_init.c
xen/drivers/passthrough/amd/iommu_map.c
xen/drivers/passthrough/pci.c
xen/drivers/passthrough/vtd/quirks.c
xen/drivers/video/vga.c
xen/drivers/vpci/vpci.c
xen/include/xen/pci.h